<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">

<title>class Bundler::Source - bundler: Ruby Standard Library Documentation</title>


<script src="../js/navigation.js" defer></script>
<script src="../js/search.js" defer></script>
<script src="../js/search_index.js" defer></script>
<script src="../js/searcher.js" defer></script>
<script src="../js/darkfish.js" defer></script>

<script src="../js/jquery-3.2.0.min.js"></script>

<script src="../js/vue.min.js"></script>
<script src="../js/js.cookie.min.js"></script>

<link href="../css/fonts.css" rel="stylesheet">
<link id='rdoccss' href="../css/rdoc.css" rel="stylesheet">
<link href="../css/carbon17.css" rel="stylesheet">

<script type="text/javascript">
  var rdoc_rel_prefix = "../";
  var index_rel_prefix = "../";
  var darkModeCsseHref = "../css/rdoc-dm.css"
  var defaultModeCssHref = "../css/rdoc.css"
  // var cssDarkmode = Cookies.get('darkmode');
  
  if( Cookies.get("darkmode") == "true") {
	$('#rdoccss').attr("href", darkModeCsseHref);
}

//  https://cssdeck.com/blog/simple-jquery-stylesheet-switcher/

document.write('<style type="text/css">body{display:none}</style>');

</script>


</head>
<body id="top" role="document" class="class">
  <!-- this is class.html -->

  <div id='actionbar' >
    <div class='wrapper mdiv'>
      <ul class='grids g0'></ul>
    </div> 
    <!-- VERSION HEADER for 3.3.0.preview2 NOT FOUND -->
  </div> <!-- end action bar -->

  <div class='wrapper hdiv'>

    


    <nav id='vapp' role="navigation">
    <div id="project-navigation">
      <div id="home-section" role="region" title="Quick navigation" class="nav-section">
  <h2><a href="../index.html" rel="home">Home</a></h2>

  <div id="table-of-contents-navigation"  >
    <a href="../table_of_contents.html#pages">Pages</a>
    <a href="../table_of_contents.html#classes">Classes</a>
    <a href="../table_of_contents.html#methods">Methods</a>
  </div>
</div>

      <div id="search-section" role="search" class="project-section initially-hidden">
  <form action="#" method="get" accept-charset="utf-8">
    <div id="search-field-wrapper">
      <input id="search-field" role="combobox" aria-label="Search"
             aria-autocomplete="list" aria-controls="search-results"
             type="text" name="search" placeholder="Search" spellcheck="false"
             title="Type to search, Up and Down to navigate, Enter to load">
    </div>

    <ul id="search-results" aria-label="Search Results"
        aria-busy="false" aria-expanded="false"
        aria-atomic="false" class="initially-hidden"></ul>
  </form>
</div>

    </div>


    

    <button id='toggleThing' @click="toggleNav()" >Show/hide navigation</button>
    <div :class="isOpen ? 'block' : 'hidden' " id='toggleMe'>
      <div id="class-metadata">
        
        
<div id="parent-class-section" class="nav-section">
  <h3>Parent</h3>

  <p class="link"><a href="../Object.html">Object</a>
</div>

        
        
        
<!-- Method Quickref -->
<div id="method-list-section" class="nav-section">
  <h3>Methods</h3>

  <ul class="link-list" role="directory">
    <li ><a href="#method-i-add_dependency_names">#add_dependency_names</a>
    <li ><a href="#method-i-cached-21">#cached!</a>
    <li ><a href="#method-i-can_lock-3F">#can_lock?</a>
    <li ><a href="#method-i-dependency_names_to_double_check">#dependency_names_to_double_check</a>
    <li ><a href="#method-i-double_check_for">#double_check_for</a>
    <li ><a href="#method-i-earlier_version-3F">#earlier_version?</a>
    <li ><a href="#method-i-extension_cache_path">#extension_cache_path</a>
    <li ><a href="#method-i-extension_cache_slug">#extension_cache_slug</a>
    <li ><a href="#method-i-identifier">#identifier</a>
    <li ><a href="#method-i-include-3F">#include?</a>
    <li ><a href="#method-i-inspect">#inspect</a>
    <li ><a href="#method-i-local-21">#local!</a>
    <li ><a href="#method-i-local_only-21">#local_only!</a>
    <li ><a href="#method-i-path-3F">#path?</a>
    <li ><a href="#method-i-print_using_message">#print_using_message</a>
    <li ><a href="#method-i-remote-21">#remote!</a>
    <li ><a href="#method-i-spec_names">#spec_names</a>
    <li ><a href="#method-i-unmet_deps">#unmet_deps</a>
    <li ><a href="#method-i-version_color">#version_color</a>
    <li ><a href="#method-i-version_message">#version_message</a>
  </ul>
</div>

      </div>
     </div>
    </nav>


    <div id='extraz'><div class='adzbox-index'  >
      
     </div>         
    </div>

    <main role="main" aria-labelledby="class-Bundler::Source">
    <h1 id="class-Bundler::Source" class="class">
      class Bundler::Source
    </h1>

    <section class="description">
    
    </section>

      <section id="5Buntitled-5D" class="documentation-section">



        <section class="attribute-method-details" class="method-section">
        <header>
        <h3>Attributes</h3>
        </header>

          <div id="attribute-i-dependency_names" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">dependency_names</span><span
                class="attribute-access-type">[RW]</span>
            </div>

            <div class="method-description">
              
              </div>
            </div>
            </section>


                <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Public Instance Methods</h3>
                </header>

                  <div id="method-i-add_dependency_names" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">add_dependency_names</span><span
                                class="method-args">(names)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="add_dependency_names-source">
            <pre><span class="ruby-comment"># File bundler/source.rb, line 44</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">add_dependency_names</span>(<span class="ruby-identifier">names</span>)
  <span class="ruby-ivar">@dependency_names</span> = <span class="ruby-constant">Array</span>(<span class="ruby-identifier">dependency_names</span>) <span class="ruby-operator">|</span> <span class="ruby-constant">Array</span>(<span class="ruby-identifier">names</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-cached-21" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">cached!</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="cached-21-source">
            <pre><span class="ruby-comment"># File bundler/source.rb, line 40</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">cached!</span>; <span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-can_lock-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">can_lock?</span><span
                                class="method-args">(spec)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="can_lock-3F-source">
            <pre><span class="ruby-comment"># File bundler/source.rb, line 32</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">can_lock?</span>(<span class="ruby-identifier">spec</span>)
  <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">source</span> <span class="ruby-operator">==</span> <span class="ruby-keyword">self</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-dependency_names_to_double_check" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">dependency_names_to_double_check</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="dependency_names_to_double_check-source">
            <pre><span class="ruby-comment"># File bundler/source.rb, line 53</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">dependency_names_to_double_check</span>
  <span class="ruby-identifier">specs</span>.<span class="ruby-identifier">dependency_names</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-double_check_for" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">double_check_for</span><span
                                class="method-args">(*)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>it’s possible that gems from one source depend on gems from some other source, so now we download gemspecs and iterate over those dependencies, looking for gems we don’t have info on yet.</p>

                              <div class="method-source-code" id="double_check_for-source">
            <pre><span class="ruby-comment"># File bundler/source.rb, line 51</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">double_check_for</span>(<span class="ruby-operator">*</span>); <span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-extension_cache_path" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">extension_cache_path</span><span
                                class="method-args">(spec)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="extension_cache_path-source">
            <pre><span class="ruby-comment"># File bundler/source.rb, line 77</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">extension_cache_path</span>(<span class="ruby-identifier">spec</span>)
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">unless</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">feature_flag</span>.<span class="ruby-identifier">global_gem_cache?</span>
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">source_slug</span> = <span class="ruby-identifier">extension_cache_slug</span>(<span class="ruby-identifier">spec</span>)
  <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">user_cache</span>.<span class="ruby-identifier">join</span>(
    <span class="ruby-string">&quot;extensions&quot;</span>, <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Platform</span>.<span class="ruby-identifier">local</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ruby_scope</span>,
    <span class="ruby-identifier">source_slug</span>, <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">full_name</span>
  )
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-identifier" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">identifier</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="identifier-source">
            <pre><span class="ruby-comment"># File bundler/source.rb, line 69</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">identifier</span>
  <span class="ruby-identifier">to_s</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-include-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">include?</span><span
                                class="method-args">(other)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="include-3F-source">
            <pre><span class="ruby-comment"># File bundler/source.rb, line 61</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">include?</span>(<span class="ruby-identifier">other</span>)
  <span class="ruby-identifier">other</span> <span class="ruby-operator">==</span> <span class="ruby-keyword">self</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-inspect" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">inspect</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="inspect-source">
            <pre><span class="ruby-comment"># File bundler/source.rb, line 65</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">inspect</span>
  <span class="ruby-node">&quot;#&lt;#{self.class}:0x#{object_id} #{self}&gt;&quot;</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-local-21" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">local!</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="local-21-source">
            <pre><span class="ruby-comment"># File bundler/source.rb, line 36</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">local!</span>; <span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-local_only-21" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">local_only!</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="local_only-21-source">
            <pre><span class="ruby-comment"># File bundler/source.rb, line 38</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">local_only!</span>; <span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-path-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">path?</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="path-3F-source">
            <pre><span class="ruby-comment"># File bundler/source.rb, line 73</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">path?</span>
  <span class="ruby-identifier">instance_of?</span>(<span class="ruby-constant">Bundler</span><span class="ruby-operator">::</span><span class="ruby-constant">Source</span><span class="ruby-operator">::</span><span class="ruby-constant">Path</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-remote-21" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">remote!</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="remote-21-source">
            <pre><span class="ruby-comment"># File bundler/source.rb, line 42</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">remote!</span>; <span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-spec_names" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">spec_names</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="spec_names-source">
            <pre><span class="ruby-comment"># File bundler/source.rb, line 57</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">spec_names</span>
  <span class="ruby-identifier">specs</span>.<span class="ruby-identifier">spec_names</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-unmet_deps" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">unmet_deps</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="unmet_deps-source">
            <pre><span class="ruby-comment"># File bundler/source.rb, line 14</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">unmet_deps</span>
  <span class="ruby-identifier">specs</span>.<span class="ruby-identifier">unmet_dependency_names</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-version_message" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">version_message</span><span
                                class="method-args">(spec, locked_spec = nil)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="version_message-source">
            <pre><span class="ruby-comment"># File bundler/source.rb, line 18</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">version_message</span>(<span class="ruby-identifier">spec</span>, <span class="ruby-identifier">locked_spec</span> = <span class="ruby-keyword">nil</span>)
  <span class="ruby-identifier">message</span> = <span class="ruby-node">&quot;#{spec.name} #{spec.version}&quot;</span>
  <span class="ruby-identifier">message</span> <span class="ruby-operator">+=</span> <span class="ruby-node">&quot; (#{spec.platform})&quot;</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">platform</span> <span class="ruby-operator">!=</span> <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Platform</span><span class="ruby-operator">::</span><span class="ruby-constant">RUBY</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span><span class="ruby-identifier">spec</span>.<span class="ruby-identifier">platform</span>.<span class="ruby-identifier">nil?</span>

  <span class="ruby-keyword">if</span> <span class="ruby-identifier">locked_spec</span>
    <span class="ruby-identifier">locked_spec_version</span> = <span class="ruby-identifier">locked_spec</span>.<span class="ruby-identifier">version</span>
    <span class="ruby-keyword">if</span> <span class="ruby-identifier">locked_spec_version</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">version</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">locked_spec_version</span>
      <span class="ruby-identifier">message</span> <span class="ruby-operator">+=</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">add_color</span>(<span class="ruby-node">&quot; (was #{locked_spec_version})&quot;</span>, <span class="ruby-identifier">version_color</span>(<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">version</span>, <span class="ruby-identifier">locked_spec_version</span>))
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">message</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

                <section id="private-instance-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Private Instance Methods</h3>
                </header>

                  <div id="method-i-earlier_version-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">earlier_version?</span><span
                                class="method-args">(spec_version, locked_spec_version)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="earlier_version-3F-source">
            <pre><span class="ruby-comment"># File bundler/source.rb, line 98</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">earlier_version?</span>(<span class="ruby-identifier">spec_version</span>, <span class="ruby-identifier">locked_spec_version</span>)
  <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Version</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">spec_version</span>) <span class="ruby-operator">&lt;</span> <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Version</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">locked_spec_version</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-extension_cache_slug" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">extension_cache_slug</span><span
                                class="method-args">(_)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="extension_cache_slug-source">
            <pre><span class="ruby-comment"># File bundler/source.rb, line 110</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">extension_cache_slug</span>(<span class="ruby-identifier">_</span>)
  <span class="ruby-keyword">nil</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-print_using_message" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">print_using_message</span><span
                                class="method-args">(message)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="print_using_message-source">
            <pre><span class="ruby-comment"># File bundler/source.rb, line 102</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">print_using_message</span>(<span class="ruby-identifier">message</span>)
  <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">message</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-string">&quot;(was &quot;</span>)
    <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">debug</span> <span class="ruby-identifier">message</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-identifier">message</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-version_color" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">version_color</span><span
                                class="method-args">(spec_version, locked_spec_version)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="version_color-source">
            <pre><span class="ruby-comment"># File bundler/source.rb, line 88</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">version_color</span>(<span class="ruby-identifier">spec_version</span>, <span class="ruby-identifier">locked_spec_version</span>)
  <span class="ruby-keyword">if</span> <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Version</span>.<span class="ruby-identifier">correct?</span>(<span class="ruby-identifier">spec_version</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Version</span>.<span class="ruby-identifier">correct?</span>(<span class="ruby-identifier">locked_spec_version</span>)
    <span class="ruby-comment"># display yellow if there appears to be a regression</span>
    <span class="ruby-identifier">earlier_version?</span>(<span class="ruby-identifier">spec_version</span>, <span class="ruby-identifier">locked_spec_version</span>) <span class="ruby-operator">?</span> <span class="ruby-value">:yellow</span> <span class="ruby-operator">:</span> <span class="ruby-value">:green</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-comment"># default to green if the versions cannot be directly compared</span>
    <span class="ruby-value">:green</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

              </section>
              </main>



            </div>  <!--  class='wrapper hdiv' -->


<footer id="validator-badges" role="contentinfo">
<p><a href="https://validator.w3.org/check/referer">Validate</a></p>
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.4.0.</p>
<p>Based on <a href="https://github.com/ged/darkfish/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.</p>

  
    <p><p><a href="https://ruby-doc.org">Ruby-doc.org</a> is provided by <a href="https://jamesbritt.com">James Britt</a> and <a href="https://neurogami.com">Neurogami</a>.</p><p><a href="https://jamesbritt.bandcamp.com/">Maximum R+D</a>.  </p>
</p>
  
  </footer>

<script type="text/javascript">


  let ads  = $("#carbonads-container").children().detach();


  function swapMode() {
    var cookieName = 'darkmode';
    var cssDarkmode = Cookies.get(cookieName);
    console.log("***** swapMode! " + cssDarkmode + " *****");


    if (cssDarkmode == "true") {
      console.log("We have dark mode, set the css to light ...");
      $('#rdoccss').attr("href", defaultModeCssHref);
      $('#cssSelect').text("Dark mode");
      cssDarkmode = "false";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    } else {
      console.log("We not have dark mode, set the css to dark ...");
      $('#rdoccss').attr("href", darkModeCsseHref);
      $('#cssSelect').text("Light mode");
      cssDarkmode = "true";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    }

    console.log("  --------------- ");
  }


const vueCssApp = new Vue({
el: '#menubar',
data: {
isDark: false
},
methods: {
toggleClass: function(event){
this.isDark = !this.isDark;
}
}
})

const vueApp = new Vue({
el: '#vapp',
data: { 
isOpen: true
},

mounted() {
this.handleResize();
this.manage_mob_classes();
window.addEventListener('resize', this.handleResize)
//this.isOpen !=  (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},
destroyed() {
window.removeEventListener('resize', this.handleResize)
},
created() {
//manage_mob_classes();
},

methods : {
isMobile() {
  return (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},

  handleResize() {
    if (!this.isMobile()) {
      this.isOpen = window.innerWidth > 800;
    }
  },

  manage_mob_classes() {
    if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
      $("nav").addClass("mob_nav");
      $("main").addClass("mob_main");
      $("#extraz").addClass("mob_extraz");
      $("#carbonads-container").addClass("mob_carbonads-container");
      this.isOpen  = false;
    } else {
      $("nav").removeClass("mob_nav") 
        $("main").removeClass("mob_main");
      $("#extraz").removeClass("mob_extraz");
      $("#carbonads-container").removeClass("mob_carbonads-container");
      this.isOpen  = true;
    }
  },

  toggleNav() {
    this.isOpen =! this.isOpen ;
    // alert("Toggle nav!");
    console.log("toggleNav() click: " + this.isOpen );
  }
}
})

$("#carbonads-container").append(ads);


$(function() {

    var darkmode = Cookies.get("darkmode");
    console.log("Document ready: " + darkmode);

    if ( darkmode  == "true" ) {
      $('#cssSelect').text("Light mode");
    } else {
      $('#cssSelect').text("Dark mode");
     }

    $('body').css('display','block');
    });

</script>

    
  </body> 
</html>

